import { Entity, Column, OneToOne, OneToMany } from 'typeorm';
import { Base } from './base.entity';
import { ApiProperty } from '@nestjs/swagger';
import { Template } from './template.entity';
import { FileEntity } from './file.entity';

@Entity()
export class Collection extends Base {
  @Column()
  @ApiProperty({ title: '用户id' })
  userId: string;

  @Column()
  @ApiProperty({ title: '模板商品' })
  productId: string;

  @Column({ default: 0 })
  @ApiProperty({ title: '是否关注' })
  isCare: number;

  @Column({ default: '1', comment: '0.卡通 1.艺术照 2.证件 3.挂件' })
  @ApiProperty({
    title: '任务类型',
    description: '0.卡通 1.艺术照 2.证件 3.挂件',
  })
  type: string;

  @Column({ default: 0, comment: '0.等待, 1.完成, 2.失败' })
  @ApiProperty({
    title: '任务状态',
    description: '0.等待, 1.完成, 2.失败',
  })
  status: number;

  @ApiProperty({ title: '是否删除' })
  @Column({ type: Number, default: 0 })
  isDelete?: number;

  @ApiProperty({ title: '展示示例图片' })
  url: string;
  //   @Column({ default: '' })
  //   @ApiProperty({ title: '模板分类' })
  //   categoryId: string;

  //   @Column({ default: '' })
  //   @ApiProperty({ title: '功能分类' })
  //   parentId: string;
}
